All Packages Class Hierarchy This Package Previous Next Index
Class sun.security.acl.GroupImpl
java.lang.Object
|
+----sun.security.acl.GroupImpl
- public class GroupImpl
- extends Object
- implements Group
This class implements a group of principals.
-
GroupImpl(String)
- Constructs a Group object with no members.
-
addMember(Principal)
- adds the specified member to the group.
-
equals(Group)
- This function returns true if the group passed matches
the group represented in this interface.
-
getName()
- return the name of the principal.
-
hashCode()
- return a hashcode for the principal.
-
isMember(Principal)
- returns true if the passed principal is a member of the group.
-
members()
- returns the enumeration of the members in the group.
-
removeMember(Principal)
- removes the specified member from the group.
-
toString()
- Prints a stringified version of the group.
GroupImpl
public GroupImpl(String groupName)
- Constructs a Group object with no members.
- Parameters:
- groupName - the name of the group
addMember
public boolean addMember(Principal user)
- adds the specified member to the group.
- Parameters:
- user - The principal to add to the group.
- Returns:
- true if the member was added - false if the
member could not be added.
removeMember
public boolean removeMember(Principal user)
- removes the specified member from the group.
- Parameters:
- user - The principal to remove from the group.
- true - if the principal was removed false if
the principal was not a member
members
public Enumeration members()
- returns the enumeration of the members in the group.
equals
public boolean equals(Group another)
- This function returns true if the group passed matches
the group represented in this interface.
- Parameters:
- another - The group to compare this group to.
toString
public String toString()
- Prints a stringified version of the group.
- Overrides:
- toString in class Object
hashCode
public int hashCode()
- return a hashcode for the principal.
- Overrides:
- hashCode in class Object
isMember
public boolean isMember(Principal member)
- returns true if the passed principal is a member of the group.
- Parameters:
- member - The principal whose membership must be checked for.
- Returns:
- true if the principal is a member of this group,
false otherwise
getName
public String getName()
- return the name of the principal.
All Packages Class Hierarchy This Package Previous Next Index